@extends('layouts.default')
@section('main')
<div class="col-sm-2 col-xs-12 pull-left" id="sidebar" role="navigation">
</div>
<div class="col-sm-6 col-sm-offset-1">
    <div class="row">
        <!-- BEGIN CONTENT -->
        <div class="panel panel-primary">
            <div class="panel-heading">
                Chọn mẫu hồ sơ để tạo lập
            </div>
            <div class="panel-body">
                <div class="col-sm-10">
                    {{ Form::hidden('idctt',$idct, array('id' => 'idctckt'))}}
                    {{ Form::hidden('status',$status, array('id' => 'status'))}}
                    <select id="iddon" name='iddon' class="nam form-control">
                        @foreach($dons as $d)
                        @if($d != null)
                            <option value='{{$d->ID}}'>{{$d->TEN_BIEU_MAU}}</option>
                        @endif
                        @endforeach
                    </select> <br>
                    <select id="idnguoiky" name='idnguoiky' class="idnguoiky form-control">
                        <option value='0' selected="">------ chọn người ký hồ sơ ------</option>
                        <option value='1'>CHI CỤC TRƯỞNG</option>
                        <option value='2'>PHÓ CHI CỤC TRƯỞNG</option>
                    </select> 
					<label class="col-ms-3">Số trang:</label>
					<input name="sotrang" id="sotrang" class="form-control col-ms-3"/>	
					<label class="col-ms-3">Số bản:</label>
					<input name="soban" id="soban" class="form-control col-ms-3"/>
                </div>
            </div>
            <div class="panel-footer">
                <a class="btn btn-default" id="backcs_id" href="{{url('ql=dscuockt')}}" title="Quay lại danh sách cuộc kiểm tra"><span class="glyphicon glyphicon-arrow-left">&nbsp;</span>Quay lại</a>
                <button id="viewBtn" class="btn btn-success"><span class="glyphicon glyphicon-file">&nbsp;</span>Xem hồ sơ</button>&nbsp;
            </div>
        </div>
       
        <!--Phan xem ho so-->
          <div class="modal" id="donWin" data-backdrop="static" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                <div class="modal-dialog" style="width: 21cm; margin-top: 70px">
                    <div class="modal-content">
                        <div class="modal-body" style="padding: 2px !important; height: 600px;">
                            <iframe id="iDon" src="" width="99.6%" height="99.6%" frameborder="0"></iframe>
                            <div id="toolbar" class="btn-group-vertical" style="display: none; position: fixed; top: 70px; left: -40px;"></div>
                        </div>
                    </div>
                </div>
            </div>
            <script>
                $('#donWin').on('hidden.bs.modal', function() {
                    $('#toolbar').empty();
                    $('#toolbar').css('display', 'none');
                    $('iframe').attr('src', '');
                });
            </script>
        <!--ket thuc phan xem ho so-->

        <script>
            $('#viewBtn').click(function (){
                $("#viewBtn").attr('data-toggle','modal');
                $("#viewBtn").attr('data-target','#donWin');
                $("#iDon").attr('src','view=hosott?idct='+$('#idctckt').val()+'&idd='+$('#iddon').val()+'&status='+$('#status').val()+'&idnguoiky='+$("#idnguoiky").val()+'&sotrang='+$("#sotrang").val()+'&soban='+$("#soban").val());
            });
        </script>
        <!-- END CONTENT -->
    </div>
</div><!--/span--> 
<!--/row-->
<div class="col-sm-6 col-sm-offset-3" style="margin-top: 20px;">
        <!--Note-->
        <h3><u><b>Lưu Ý</b></u></h3>
        <div class="bs-callout bs-callout-warning">
            Chưa có lưu ý nào.
        </div>
        <!--Kết thúc note-->
</div>
@stop